#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<random>
#define N 300
using namespace std;
mt19937 RAND(random_device{}());
int n=300;
char c[N+1];
int main()
{
	freopen("bracket.in","w",stdout);
	cout<<n<<endl;
	for (int i=1;i<=n;++i) c[i]=(RAND()&1)?'(':')';
	for (int i=1;i<=20;++i) c[RAND()%n+1]='x';
	for (int i=1;i<=n;++i) cout<<c[i];
	cout<<endl;
	return 0;
}
